package day3.problem2;

//dd爱框框(滑动窗口)
//https://ac.nowcoder.com/acm/problem/221681

import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws Exception{
        Read read = new Read();
        int n = read.nextInt();
        int x = read.nextInt();
        int[] a = new int[n];
        for(int i = 0; i<n; i++) {
            a[i] = read.nextInt();
        }
        int len  = n, sum = 0;
        int l = 0, r = 0;
        for(int i = 0, j = 0; j<n; j++) {
            sum += a[j];
            while(sum >= x) {
                if(j - i + 1 < len) {
                    len = j - i + 1;
                    l = i+1;
                    r = j+1;
                }
                sum -= a[i++];
            }
        }
        System.out.println(l + " " + r);
    }
}


class Read // 自定义快读 Read
{
    StringTokenizer st = new StringTokenizer("");
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
    String next() throws IOException
    {
        while(!st.hasMoreTokens())
        {
            st = new StringTokenizer(bf.readLine());
        }
        return st.nextToken();
    }
    String nextLine() throws IOException
    {
        return bf.readLine();
    }
    int nextInt() throws IOException
    {
        return Integer.parseInt(next());
    }
    long nextLong() throws IOException
    {
        return Long.parseLong(next());
    }
    double nextDouble() throws IOException
    {
        return Double.parseDouble(next());
    }
}